<template>
  <!-- 商品列表 -->
  <div>
    <!-- <h2>待审核商品</h2> -->
    <h2>商品列表</h2>
    <el-table border :data="data">
      <el-table-column prop="id" label="编号" width="80"></el-table-column>
      <el-table-column prop="title" label="标题" show-overflow-tooltip></el-table-column>
      <el-table-column prop="commodity" label="商品名称"></el-table-column>
      <el-table-column prop="price" label="价格" width="60"></el-table-column>
      <el-table-column prop="img" label="图片" width="180">
        <!-- <template slot-scope="scope">
          <img :src="`${scope.row.img}`" alt="">
        </template> -->
        <img src="" alt="" width="40px">
      </el-table-column>
      <el-table-column prop="ShopId" label="所属店铺" width="80"></el-table-column>
      <!-- 0:审核未通过  1:审核通过 2:待审核 9:禁用-->
      <!-- <el-table-column prop="state" label="商品状态" width="100">
        <template slot-scope="scope">
          <span v-if="scope.row.good_state==1"><el-alert title="通过" type="success" show-icon :closable="false"></el-alert></span>
          <span v-if="scope.row.good_state==2">
              <el-popover
                placement="top-start"
                title=""
                width="200"
                trigger="hover"
                content="点击查看详细信息">
                <el-button slot="reference">待审核</el-button>
              </el-popover>
          </span>
          <span v-if="scope.row.good_state==0">未通过</span>
          <span v-if="scope.row.good_state==9"><el-alert title="禁用" type="error" show-icon :closable="false"></el-alert></span>
        </template>
      </el-table-column> -->
      <el-table-column label="操作" align="center" width="300">
        <el-button type="success">通过</el-button>
        <el-button type="error">不通过</el-button>
        <el-button type="danger">禁用</el-button>
      </el-table-column>
      
    </el-table>
  </div>
</template>
<script>
///showgoods
export default {
  data() {
    return {
      data: null,
    }
  },
  mounted(){
    this.axios.get('/commodity/showgoods').then(res=>{
      this.data = res.data
    })
  }
  
}
</script>